package com.xinyirun.scm.bean.entity.master.driver;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 司机
 * </p>
 *
 * @author htt
 * @since 2021-09-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("m_driver")
public class MDriverEntity implements Serializable {

    private static final long serialVersionUID = -1370973656415118838L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 司机编码
     */
    @TableField("code")
    private String code;

    /**
     * 司机名称
     */
    @TableField("name")
    private String name;

    /**
     * 手机号
     */
    @TableField("mobile_phone")
    private String mobile_phone;

    /**
     * 身份证号
     */
    @TableField("id_card")
    private String id_card;

    /**
     * 身份正面附件id
     */
    @TableField("id_card_front")
    private Integer id_card_front;

    /**
     * 身份反面附件id
     */
    @TableField("id_card_back")
    private Integer id_card_back;

    /**
     * 是否删除
     */
    @TableField("is_del")
    private Boolean is_del;

    /**
     * 驾驶证附件id
     */
    @TableField("driver_license")
    private Integer driver_license;

    /**
     * 司机承诺书id
     */
    @TableField("commitment_letter")
    private Integer commitment_letter;

    /**
     * 创建时间
     */
    @TableField(value="c_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
    private LocalDateTime c_time;

    /**
     * 修改时间
     */
    @TableField(value="u_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime u_time;

    /**
     * 创建人id
     */
    @TableField(value="c_id", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
    private Long c_id;

    /**
     * 修改人id
     */
    @TableField(value="u_id", fill = FieldFill.INSERT_UPDATE)
    private Long u_id;

    /**
     * 数据版本，乐观锁使用
     */
    @Version
    @TableField(value="dbversion")
    private Integer dbversion;


}
